//猜数字游戏
import java.util.Random;
import java.util.Scanner;
public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int randNum = random.nextInt(100); //生成0~100的随机数
        while (true) {
            System.out.println("请输入数字：");
            int num = scanner.nextInt();
            if(num < randNum) {
                System.out.println("猜小了");
            } else if(num ==randNum) {
                System.out.println("猜对啦");
                break;
            } else {
                System.out.println("猜大了");
            }
        }
    }
}

